3.3.47 \(\int \frac {(a+b \log (c x^n))^2}{(d+e x^2)^2} \, dx\) [247]

3.3.47.1 Optimal result
3.3.47.2 Mathematica [A] (verified)
3.3.47.3 Rubi [A] (verified)
3.3.47.4 Maple [F]
3.3.47.5 Fricas [F]
3.3.47.6 Sympy [F]
3.3.47.7 Maxima [F(-2)]
3.3.47.8 Giac [F]
3.3.47.9 Mupad [F(-1)]

3.3.47.1 Optimal result

Integrand size = 22, antiderivative size = 509 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx=\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{4 (-d)^{3/2} \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{4 (-d)^{3/2} \left (\sqrt {-d}+\sqrt {e} x\right )}+\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{4 (-d)^{3/2} \sqrt {e}}-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{4 (-d)^{3/2} \sqrt {e}}-\frac {b^2 n^2 \operatorname {PolyLog}\left (2,-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {b n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {b^2 n^2 \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}-\frac {b n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}-\frac {b^2 n^2 \operatorname {PolyLog}\left (3,-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {b^2 n^2 \operatorname {PolyLog}\left (3,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}} \]

output
1/2*b*n*(a+b*ln(c*x^n))*ln(1-x*e^(1/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)-1/4* 
(a+b*ln(c*x^n))^2*ln(1-x*e^(1/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)-1/2*b*n*(a 
+b*ln(c*x^n))*ln(1+x*e^(1/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)+1/4*(a+b*ln(c* 
x^n))^2*ln(1+x*e^(1/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)-1/2*b^2*n^2*polylog( 
2,-x*e^(1/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)+1/2*b*n*(a+b*ln(c*x^n))*polylo 
g(2,-x*e^(1/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)+1/2*b^2*n^2*polylog(2,x*e^(1 
/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)-1/2*b*n*(a+b*ln(c*x^n))*polylog(2,x*e^( 
1/2)/(-d)^(1/2))/(-d)^(3/2)/e^(1/2)-1/2*b^2*n^2*polylog(3,-x*e^(1/2)/(-d)^ 
(1/2))/(-d)^(3/2)/e^(1/2)+1/2*b^2*n^2*polylog(3,x*e^(1/2)/(-d)^(1/2))/(-d) 
^(3/2)/e^(1/2)+1/4*x*(a+b*ln(c*x^n))^2/(-d)^(3/2)/((-d)^(1/2)-x*e^(1/2))+1 
/4*x*(a+b*ln(c*x^n))^2/(-d)^(3/2)/((-d)^(1/2)+x*e^(1/2))
 
3.3.47.2 Mathematica [A] (verified)

Time = 0.49 (sec) , antiderivative size = 432, normalized size of antiderivative = 0.85 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx=\frac {-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {\left (a+b \log \left (c x^n\right )\right )^2}{d \left (\sqrt {-d}+\sqrt {e} x\right )}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{3/2}}+\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{3/2}}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{3/2}}+\frac {d \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{5/2}}+\frac {2 b^2 n^2 \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{3/2}}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{3/2}}-\frac {2 b^2 n^2 \operatorname {PolyLog}\left (2,\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{3/2}}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{3/2}}+\frac {2 b^2 n^2 \operatorname {PolyLog}\left (3,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{3/2}}-\frac {2 b^2 n^2 \operatorname {PolyLog}\left (3,\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{3/2}}}{4 \sqrt {e}} \]

input
Integrate[(a + b*Log[c*x^n])^2/(d + e*x^2)^2,x]
 
output
(-((a + b*Log[c*x^n])^2/(d*(Sqrt[-d] - Sqrt[e]*x))) + (a + b*Log[c*x^n])^2 
/(d*(Sqrt[-d] + Sqrt[e]*x)) - (2*b*n*(a + b*Log[c*x^n])*Log[1 + (Sqrt[e]*x 
)/Sqrt[-d]])/(-d)^(3/2) + ((a + b*Log[c*x^n])^2*Log[1 + (Sqrt[e]*x)/Sqrt[- 
d]])/(-d)^(3/2) + (2*b*n*(a + b*Log[c*x^n])*Log[1 + (d*Sqrt[e]*x)/(-d)^(3/ 
2)])/(-d)^(3/2) + (d*(a + b*Log[c*x^n])^2*Log[1 + (d*Sqrt[e]*x)/(-d)^(3/2) 
])/(-d)^(5/2) + (2*b^2*n^2*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]])/(-d)^(3/2) - 
(2*b*n*(a + b*Log[c*x^n])*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]])/(-d)^(3/2) - ( 
2*b^2*n^2*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/(-d)^(3/2) + (2*b*n*(a + b 
*Log[c*x^n])*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/(-d)^(3/2) + (2*b^2*n^2 
*PolyLog[3, (Sqrt[e]*x)/Sqrt[-d]])/(-d)^(3/2) - (2*b^2*n^2*PolyLog[3, (d*S 
qrt[e]*x)/(-d)^(3/2)])/(-d)^(3/2))/(4*Sqrt[e])
 
3.3.47.3 Rubi [A] (verified)

Time = 0.85 (sec) , antiderivative size = 509, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2767, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx\)

\(\Big \downarrow \) 2767

\(\displaystyle \int \left (-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{2 d \left (-d e-e^2 x^2\right )}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{4 d \left (\sqrt {-d} \sqrt {e}-e x\right )^2}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{4 d \left (\sqrt {-d} \sqrt {e}+e x\right )^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b n \operatorname {PolyLog}\left (2,-\frac {\sqrt {e} x}{\sqrt {-d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 (-d)^{3/2} \sqrt {e}}-\frac {b n \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {b n \log \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 (-d)^{3/2} \sqrt {e}}-\frac {b n \log \left (\frac {\sqrt {e} x}{\sqrt {-d}}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{4 (-d)^{3/2} \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {x \left (a+b \log \left (c x^n\right )\right )^2}{4 (-d)^{3/2} \left (\sqrt {-d}+\sqrt {e} x\right )}-\frac {\log \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right ) \left (a+b \log \left (c x^n\right )\right )^2}{4 (-d)^{3/2} \sqrt {e}}+\frac {\log \left (\frac {\sqrt {e} x}{\sqrt {-d}}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{4 (-d)^{3/2} \sqrt {e}}-\frac {b^2 n^2 \operatorname {PolyLog}\left (2,-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {b^2 n^2 \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}-\frac {b^2 n^2 \operatorname {PolyLog}\left (3,-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}+\frac {b^2 n^2 \operatorname {PolyLog}\left (3,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 (-d)^{3/2} \sqrt {e}}\)

input
Int[(a + b*Log[c*x^n])^2/(d + e*x^2)^2,x]
 
output
(x*(a + b*Log[c*x^n])^2)/(4*(-d)^(3/2)*(Sqrt[-d] - Sqrt[e]*x)) + (x*(a + b 
*Log[c*x^n])^2)/(4*(-d)^(3/2)*(Sqrt[-d] + Sqrt[e]*x)) + (b*n*(a + b*Log[c* 
x^n])*Log[1 - (Sqrt[e]*x)/Sqrt[-d]])/(2*(-d)^(3/2)*Sqrt[e]) - ((a + b*Log[ 
c*x^n])^2*Log[1 - (Sqrt[e]*x)/Sqrt[-d]])/(4*(-d)^(3/2)*Sqrt[e]) - (b*n*(a 
+ b*Log[c*x^n])*Log[1 + (Sqrt[e]*x)/Sqrt[-d]])/(2*(-d)^(3/2)*Sqrt[e]) + (( 
a + b*Log[c*x^n])^2*Log[1 + (Sqrt[e]*x)/Sqrt[-d]])/(4*(-d)^(3/2)*Sqrt[e]) 
- (b^2*n^2*PolyLog[2, -((Sqrt[e]*x)/Sqrt[-d])])/(2*(-d)^(3/2)*Sqrt[e]) + ( 
b*n*(a + b*Log[c*x^n])*PolyLog[2, -((Sqrt[e]*x)/Sqrt[-d])])/(2*(-d)^(3/2)* 
Sqrt[e]) + (b^2*n^2*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]])/(2*(-d)^(3/2)*Sqrt[e 
]) - (b*n*(a + b*Log[c*x^n])*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]])/(2*(-d)^(3/ 
2)*Sqrt[e]) - (b^2*n^2*PolyLog[3, -((Sqrt[e]*x)/Sqrt[-d])])/(2*(-d)^(3/2)* 
Sqrt[e]) + (b^2*n^2*PolyLog[3, (Sqrt[e]*x)/Sqrt[-d]])/(2*(-d)^(3/2)*Sqrt[e 
])
 

3.3.47.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2767
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_)^(r_.))^( 
q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (d + e*x 
^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n, p, q, r}, x] 
&& IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[r]))
 
3.3.47.4 Maple [F]

\[\int \frac {{\left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}}{\left (e \,x^{2}+d \right )^{2}}d x\]

input
int((a+b*ln(c*x^n))^2/(e*x^2+d)^2,x)
 
output
int((a+b*ln(c*x^n))^2/(e*x^2+d)^2,x)
 
3.3.47.5 Fricas [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2}} \,d x } \]

input
integrate((a+b*log(c*x^n))^2/(e*x^2+d)^2,x, algorithm="fricas")
 
output
integral((b^2*log(c*x^n)^2 + 2*a*b*log(c*x^n) + a^2)/(e^2*x^4 + 2*d*e*x^2 
+ d^2), x)
 
3.3.47.6 Sympy [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx=\int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{\left (d + e x^{2}\right )^{2}}\, dx \]

input
integrate((a+b*ln(c*x**n))**2/(e*x**2+d)**2,x)
 
output
Integral((a + b*log(c*x**n))**2/(d + e*x**2)**2, x)
 
3.3.47.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx=\text {Exception raised: ValueError} \]

input
integrate((a+b*log(c*x^n))^2/(e*x^2+d)^2,x, algorithm="maxima")
 
output
Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(e>0)', see `assume?` for more de 
tails)Is e
 
3.3.47.8 Giac [F]

\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x^{2} + d\right )}^{2}} \,d x } \]

input
integrate((a+b*log(c*x^n))^2/(e*x^2+d)^2,x, algorithm="giac")
 
output
integrate((b*log(c*x^n) + a)^2/(e*x^2 + d)^2, x)
 
3.3.47.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{\left (d+e x^2\right )^2} \, dx=\int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{{\left (e\,x^2+d\right )}^2} \,d x \]

input
int((a + b*log(c*x^n))^2/(d + e*x^2)^2,x)
 
output
int((a + b*log(c*x^n))^2/(d + e*x^2)^2, x)